﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace TimHeuer.Expression.S3Publish
{
    public class PublishData : INotifyPropertyChanged
    {
        private string _accessKey;
        private string _secret;
        private bool _makePublic;
        private string _bucket;
        private bool _saveKey;

        public bool SaveSecret
        {
            get { return _saveKey; }
            set
            {
                _saveKey = value;
                this.OnPropertyChanged("SaveSecret");
            }
        }

        public string AccessKey
        {
            get { return _accessKey; }
            set
            {
                _accessKey = value;
                this.OnPropertyChanged("AccessKey");
            }
        }

        public string SecretKey
        {
            get { return _secret; }
            set
            {
                _secret = value;
                this.OnPropertyChanged("SecretKey");
            }
        }

        public string DestinationBucket
        {
            get { return _bucket; }
            set
            {
                _bucket = value;
                this.OnPropertyChanged("DestinationBucket");
            }
        }

        public bool MakePublic
        {
            get { return _makePublic; }
            set
            {
                _makePublic = value;
                this.OnPropertyChanged("MakePublic");
            }
        }

        private void OnPropertyChanged(string propertyName)
        {
            if (this.PropertyChanged != null)
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion
    }
}
